﻿Imports System.Web.Mvc
Imports System.Runtime.CompilerServices

Namespace Helpers
    Public Module HtmlHelpers

        <Extension()>
        Public Function Truncate(ByVal helper As HtmlHelper, ByVal input As String, ByVal length As Integer) As String
            If input.Length <= length Then
                Return input
            Else
                Return input.Substring(0, length) & "..."
            End If
        End Function

    End Module
End Namespace